r = 1 gotnote = 1 demon = 1 SCREEN 12 COLOR 7, 0 CLS DIM SHARED DOOM AS DOUBLE Minutes = 10 Seconds = 0 GameTime = Minutes * 60 + Seconds DIM directions(1 TO 9) AS STRING directions(1) = "WEST" directions(2) = "EAST OR SOUTH" directions(3) = "NORTH, SOUTH, EAST, OR WEST" directions(4) = "EAST" directions(5) = "NORTH" directions(6) = "WEST OR SOUTH" directions(7) = "NORTH OR EAST" directions(8) = "EAST OR WEST" directions(9) = "WEST" PRINT "" PRINT "" PRINT "Hours have passed, since you've fled the confines of the parking lot. You" PRINT "being to afraid to stop, the fear of that beast. It's been crying, scratching" PRINT "upon the thin layer of steel that seperates you from the outside world..." PRINT "All is silent now, all is dead now, and all that is known is survival...Your" PRINT "car runs out of gas and you are standing in the middle of a street. Located" PRINT "within a small hamlet, in the crossroads between the living and the dead." PRINT "In the dead of night you reach the small hamlet of Wayne, you don't know why" PRINT "but you felt the need to be here. The last thing you heard from your mom was" PRINT "that she was here. So now it begins." PRINT "" DO: LOOP UNTIL INKEY$ <> "" DOOM = TIMER(0.001) + GameTime 'change this to to desied time for the game to run DO CLS PRINT PRINT PRINT " " PRINT " " PRINT " " PRINT " The Lurking Beast - Chapter 2 " PRINT " " PRINT " Written by " PRINT " " PRINT " D.B. Taylor" PRINT "" PRINT " Copyright (c) 2016" PRINT "" PRINT SPACE$(38); IF INSTR(directions(r), "NORTH") THEN PRINT "N" ELSE PRINT PRINT "*---------------------------------* "; IF INSTR(directions(r), "WEST") THEN PRINT "W"; ELSE PRINT " "; PRINT " + "; IF INSTR(directions(r), "EAST") THEN PRINT "E"; ELSE PRINT " "; PRINT " *------------------------------------*" PRINT SPACE$(38); IF INSTR(directions(r), "SOUTH") THEN PRINT "S" ELSE PRINT PRINT PRINT "If you are stuck just type HELP." PRINT GOSUB ROOM GOSUB parser LOOP ROOM: IF r = 1 THEN: GOSUB r1 IF r = 2 THEN: GOSUB r2 IF r = 3 THEN: GOSUB r3 IF r = 4 THEN: GOSUB r4 IF r = 5 THEN: GOSUB r5 IF r = 6 THEN: GOSUB r6 IF r = 7 THEN: GOSUB r7 IF r = 8 THEN: GOSUB r8 IF r = 9 THEN: GOSUB r9 RETURN parser: PRINT "> "; cmd$ = GrabInput cmd$ = LTRIM$(RTRIM$(UCASE$(cmd$))) IF cmd$ = "END" OR cmd$ = "QUIT" OR cmd$ = "EXIT" OR cmd$ = "Q" THEN END END IF IF cmd$ = "HELP" OR cmd$ = "H" OR cmd$ = "?" THEN CLS PRINT "HERE ARE SOME BASIC COMMANDS THAT CAN BE USED IN THE GAME..." PRINT PRINT "NORTH, EAST ,SOUTH, AND WEST - MOVE TO AN AVAILABLE LOCATION" PRINT "EXAMINE (OBJECT) - EXAMINE AN OBJECT" PRINT "USE (OBJECT) - USE AN OBJECT" PRINT "TAKE (OBJECT) - TAKE OR MOVE AN OBJECT" PRINT "INVENTORY - VIEW YOUR INVENTORY" PRINT "DRINK - DRINK BEER" PRINT "UNLOCK - UNLOCK DOOR" PRINT "HELP - VIEW THIS SCREEN" PRINT "END - END GAME" PRINT PRINT "PRESS ANY KEY...": SLEEP DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "INVENTORY" OR cmd$ = "INV" OR cmd$ = "ITEMS" OR cmd$ = "I" THEN CLS PRINT "INVENTORY..." PRINT IF gotnote = 1 THEN: PRINT "A note written from your Mother." PRINT PRINT "PRESS ANY KEY..." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF cmd$ = "GO NORTH" OR cmd$ = "NORTH" OR cmd$ = "N" THEN IF r = 5 THEN: r = 3: GOTO moved IF r = 3 THEN: r = 2: GOTO moved IF r = 7 THEN: r = 6: GOTO moved END IF IF cmd$ = "GO EAST" OR cmd$ = "EAST" OR cmd$ = "E" THEN IF r = 2 THEN: r = 1: GOTO moved IF r = 4 THEN: r = 3: GOTO moved IF r = 3 THEN: r = 6: GOTO moved IF r = 7 THEN: r = 8: GOTO moved IF r = 8 THEN: r = 9: GOTO moved END IF IF cmd$ = "GO SOUTH" OR cmd$ = "SOUTH" OR cmd$ = "S" THEN IF r = 2 THEN: r = 3: GOTO moved IF r = 3 THEN: r = 5: GOTO moved IF r = 6 THEN: r = 7: GOTO moved END IF IF cmd$ = "GO WEST" OR cmd$ = "WEST" OR cmd$ = "W" THEN IF r = 1 THEN: r = 2: GOTO moved IF r = 6 THEN: r = 3: GOTO moved IF r = 3 THEN: r = 4: GOTO moved IF r = 9 THEN: r = 8: GOTO moved IF r = 8 THEN: r = 7: GOTO moved END IF IF (cmd$ = "READ NOTE") THEN CLS PRINT "It reads. -At night it feeds. In the day it sleeps. It crosses" PRINT "into our world and must be stopped." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE DEMON") AND r = 9 THEN CLS PRINT "Standing before you, the beast lets out a blood thirsty scream and" PRINT "before your eye's, it's flesh begins to split like that of an old" PRINT "pair of pants left to the elements. The wings are gone and now it" PRINT "it stands on all fours. It's eye's are glowing read and sticks it's" PRINT "tongue out like a hungry dog." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "EXAMINE NOTE") AND gotnote = 1 THEN CLS PRINT "It's written by your mom. The letter head reads -Wayne, Alberta-." DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "ENTER HOTEL") AND r = 9 THEN CLS GOTO win: DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF IF (cmd$ = "ENTER CAR") AND r = 1 THEN CLS GOTO lose: DO: LOOP UNTIL INKEY$ = "" DO: LOOP UNTIL INKEY$ <> "" END IF moved: RETURN r1: PRINT "The night seems to be stretching out for eternity. Everything" PRINT "around is silent. Not a soul can be seen nor a sound can be" PRINT "heard. You wonder, just where this creature is and when will" PRINT "it return? Behind you is your car." RETURN r2: PRINT "The silence is almost deafening. A lone street light gives" PRINT "off a halo of safety." RETURN r3: PRINT "You are standing in the centre of the Hamlet. To the WEST there's" PRINT "a playground. To the EAST, is the HOTEL. To the SOUTH...a dead end." RETURN r4: PRINT "You are standing in what can only be described as the most" PRINT "fearful place on the planet. Everything is covered in a thin" PRINT "layer of rust. The creepy grins from the overly large clown" PRINT "heads, gives you the feeling of dread." RETURN r5: PRINT "You are standing at the ledge of a ravine. A rusted chainlink fence" PRINT "stretches out into the darkness. Looking below, you see a dried out" PRINT "river bed." RETURN r6: PRINT "You are walking down a single lane dirt road. The odd house built" PRINT "after the war decorates the barren landscape of this place." RETURN r7: PRINT "In the distance...you hear the scream of an old man. Followed by" PRINT "by sevre gunshots that race through the night air." RETURN r8: PRINT "With every step you take closer towards the hotel. A silence comes" PRINT "over the landscape." RETURN r9: PRINT "You are standing before the Rosedeer Hotel. The smell of death lingers" PRINT "in the air. You notice the front door is open and the faint sounds of" PRINT "someone crying is heard. Flying within the night sky lurks the Demon." RETURN win: COLOR 7, 0 CLS PRINT "You enter the hotel and find yourself standing in what looks like" PRINT "another world. A step back in time. The lights are, a fire is growing" PRINT "in the fireplace, and you are greeted by an odd little man." PRINT "" PRINT "End of Chapter 2." PRINT DO: LOOP UNTIL INKEY$ <> "" END lose: COLOR 7, 0 CLS PRINT "You lock the doors and panic. Within moments, you are dragged out of" PRINT "the car by an unseen being, and feasted upon by that demonic force..." PRINT "pity." DO: LOOP UNTIL INKEY$ <> "" END FUNCTION GrabInput$ x = POS(0) y = CSRLIN maxwidth = _WIDTH - x PCOPY 0, 1 'make a backup copy of the screen DO k = _KEYHIT i$ = INKEY$ LOOP UNTIL k = 0 AND INKEY$ = "" 'clear the keyboard buffer DO _LIMIT 30 PCOPY 1, 0 LOCATE y, x: PRINT Userinput$ k = _KEYHIT SELECT CASE k CASE 8 Userinput$ = LEFT$(Userinput$, LEN(Userinput$) - 1) CASE 65 TO 90, 97 TO 122, 32 Userinput$ = UCASE$(Userinput$ + CHR$(k)) END SELECT timerleft## = (DOOM - TIMER(0.001)) minutes = timerleft## \ 60 seconds = timerleft## - minutes * 60 LOCATE 2, 32: PRINT USING " ###:##.###"; minutes, seconds IF timerleft## <= 0 THEN GOTO doomed _DISPLAY LOOP UNTIL k = 13 GrabInput$ = Userinput$ _AUTODISPLAY EXIT FUNCTION doomed: CLS PRINT "You took to long...everything is lost. Though, they do" PRINT "find your body months later in the woods. Nothing was" PRINT "left but the bones." _DISPLAY END END SUB